package com.example.shiro_realy.controller;

import com.example.shiro_realy.domian.JsonData;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController//可以返回Json数据，controller只能返回页面
public class LogoutController {
//    @RequestMapping("/logout")
//    public JsonData playRecord(){
//        Subject subject = SecurityUtils.getSubject();
//        if (subject.getPrincipals() != null) {
//
//        }
//        SecurityUtils.getSubject().logout();
//        return JsonData.buildSuccess("退出成功");
//    }
}
